
<%@page import="sjs.service.PMF"%><%@ page language="java"  contentType="text/html;charset=utf-8" pageEncoding="utf-8"%>
<%@page import="com.google.appengine.api.datastore.Text"%>
<%@page import="sjs.bean.Article"%>
<%@page import="sjs.util.Common"%>
<%
	String act=Common.getParamEmpty(request,"act");
	if(act.equals("add")){
		Article art=new Article();
		art.setAuther(Common.getParamEmpty(request,"auther"));
		art.setTitle(Common.getParamEmpty(request,"title"));
		String s=Common.getParamEmpty(request,"text");
		Text t=new Text(s);
		art.setText(t);
		System.out.println(art.getText());
		art.setUpdatedate(Common.getTime18bit());
		PMF.save(art);
		out.print("<script>window.location.href='main.jsp';</script>");
	}

%>